<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Create</title>
</head>
<body>
{% extends 'base.html' %}
{% block content %}

<div>
    <form method="post" action="/write">
        <div class="form-group">
            <label for="deviceIdInput">IoT Device Name</label>
            <input type="text" class="form-control" id="deviceIdInput" name="device_id_input">
        </div>
        <div class="form-group">
            <input type="submit" class="btn btn-primary" name="set" value="Write Data">
        </div>
    </form>
</div>

{% if device_id is not none %}
    <div>
        <p>Success! IoT device {{device_id}} has written data.</p>
    </div>
{% endif %}



{% endblock %}
</body>
</html>